<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="t" uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>

<table class="table table-bordered table-striped table-hover">
    <thead>
        <tr>
            <th><i class="icon-caret-right blue"></i>Nome</th>
            <th><i class="icon-caret-right blue"></i>Login</th>
            <th></th>

        </tr>
    </thead>

    <tbody>
        <c:forEach var="item" items="${dataList}">
            <s:url value="/usuarios/edit" var="edit_url">
                <s:param name="id" value="${item.id}" />
            </s:url>
            <s:url value="/usuarios/remove" var="remove_url">
                <s:param name="id" value="${item.id}" />
            </s:url>
            <s:url value="/usuarios/detail" var="detail_url">
                <s:param name="id" value="${item.id}" />
            </s:url>
            <tr>
                <td class="align-middle">
                    <a href="${detail_url}">${item.totalMetar}</a>
                </td>
                <td class="align-middle">
                    <a href="${detail_url}">${item.totalSpeci}</a>
                </td>

                <td class="align-middle">

                    <div class="btn-group">
                        <button data-toggle="dropdown" class="btn btn-info dropdown-toggle">
                            Ações
                            <i class="icon-angle-down icon-on-right"></i>
                        </button>

                        <ul class="dropdown-menu pull-right">
                            <li>
                                <a href="${detail_url}">Detalhes</a>
                            </li>

                            <li>
                                <a href="${edit_url}">Editar</a>
                            </li>

                            <li>
                                <a href="${remove_url}" class="remove" confirm="Tem certeza de que deseja excluir este usuário?">Excluir</a>
                            </li>

                        </ul>
                    </div>


                </td>

            </tr>
        </c:forEach>
        <tr class="info">
            <td colspan="3"><b>Total: </b> ${total}</td>
        </tr>
    </tbody>
</table>